//
//  UILabel+ContentSize.m
//  wozhua
//
//  Created by 王洋 on 14-10-16.
//  Copyright (c) 2014年 王洋. All rights reserved.
//

#import "UILabel+ContentSize.h"

@implementation UILabel (ContentSize)

- (CGFloat)contentWidth {
    return ceil([self sizeThatFits:CGSizeMake(CGFLOAT_MAX, self.height)].width);
}

- (CGFloat)contentHeight {
    return ceil([self sizeThatFits:CGSizeMake(self.width, CGFLOAT_MAX)].height);
}

@end
